#!/usr/bin/perl -w

### Notes:
# The -T for security check would help to protect the script but was giving error and was removed.
# TODO: Maybe try to create the directories that it doesn't find?
# TODO: Perhaps check the existance of 'lsof'?

use FCTranscode;

$exit_status = 0;

unless (-e $settingsdir )	{ print "ERROR:0000: Could not find settingsdir on '$settingsdir'\n";		$exit_status = 1; }
unless (-e $outputdir )		{ print "ERROR:0000: Could not find outputdir on '$outputdir'\n";		$exit_status = 1; }
unless (-e $store_location )	{ print "ERROR:0000: Could not find store_location on '$store_location'\n";	$exit_status = 1; }
unless (-e $cache_dir )		{ print "ERROR:0000: Could not find cache_dir on '$cache_dir'\n";		$exit_status = 1; }

unless (-e $mediainfo )         { print "ERROR:0000: Could not find mediainfo on '$mediainfo'\n";               $exit_status = 1; }

unless (-e $work_dir )          { print "ERROR:0000: Could not find work_dir on '$work_dir'\n";                 exit(1); }      # Can exit straight away since the bellow will fail anyway
unless (-e $monitor_loc )	{ print "ERROR:0000: Could not find monitor_loc on '$monitor_loc'\n";		$exit_status = 1; }
unless (-e $conv_loc )		{ print "ERROR:0000: Could not find conv_loc on '$conv_loc'\n";			$exit_status = 1; }

exit($exit_status);

